package com.example.administrator.onepagelibrary.onebase;



import com.example.administrator.commonlibrary.contract.activity.MaiAcivityContract;
import com.example.administrator.commonlibrary.utils.FragmentUtil;
import com.example.administrator.onepagelibrary.R;
import com.example.administrator.onepagelibrary.presenter.activity.MaiActivityPresenter;
import com.example.administrator.onepagelibrary.view.fragment.OneFragment;


import javax.inject.Inject;

/**
 * @author wang_hong_wei
 * @description 单独运行一个功能的测试MaiActivity
 * @Date 2018-5-11
 */
public class MainActivity extends OneBaseViewActivity<MaiAcivityContract.Presenter> implements MaiAcivityContract.View {
    @Inject
    MaiActivityPresenter presenter;

    @Override
    protected void myOnCreate() {
        FragmentUtil.addFragmentToActivity(getSupportFragmentManager(), new OneFragment(), R.id.framelayout);
    }

    @Override
    protected int onLayout() {
        return R.layout.one_activity_main;
    }

    @Override
    protected String setPageTitle() {
        return "测试入口";
    }

    @Override
    protected MaiAcivityContract.Presenter initPresenter() {
        return presenter;
    }
}
